
#ifndef _DMC_WIN32API_H_
#define _DMC_WIN32API_H_
	#include	<windef.h>
	
	#define GAI_STRERROR_BUFFER_SIZE 1024
	
	int WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION*, int);
	BOOL WINAPI CryptGenRandom( HCRYPTPROV hProv,DWORD dwLen,BYTE *pbBuffer);
	BOOL WINAPI CryptAcquireContextW(HCRYPTPROV*, LPCWSTR , LPCTSTR ,DWORD,DWORD);
	BOOL WINAPI CryptAcquireContextA(HCRYPTPROV*,LPCSTR, LPCSTR, DWORD, DWORD);
	BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
	BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
	BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION);
	
	int WSAAPI getnameinfo(
		const struct sockaddr FAR *sa,
		int salen,
		char FAR *host,
		DWORD hostlen,
		char FAR *serv,
		DWORD servlen,
		int flags
	);


/*
	void WSAAPI freeaddrinfo(struct evutil_addrinfo*);
	int WSAAPI getaddrinfo(char*,char*, evutil_addrinfo *pHints, evutil_addrinfo **ppResult);
	#ifdef UNICODE
		#define gai_strerror   gai_strerrorW
		#define SHGetSpecialFolderPath   SHGetSpecialFolderPathA
		#define CryptAcquireContext	CryptAcquireContextA
	#else
		#define gai_strerror   gai_strerrorA
		#define SHGetSpecialFolderPath   SHGetSpecialFolderPathW
		#define CryptAcquireContext	CryptAcquireContextW
	#endif
*/

#endif